Prevent a stray error message in the case that either DISTDIR or
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 21 Mar 2006 21:57:47 +0000 (22:57 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 21 Mar 2006 21:57:47 +0000 (22:57 +0100)
DESTDIR is empty, by preventing readlink from being called in that
case.

Another option would be to use readlink -s, but that has the
undesirable effect of staying silent in situations other than empty
DISTDIR/DESTDIR

Signed-off-by: Aron Griffis <aron@hp.com>
tools/examples/Makefile

index 6e71f563bf8867e02da3b49e28f3cdfec37b7b31..37a94b6329622316c6a0c40083f6f57abcc27b69 100644 (file)
@@ -38,8 +38,8 @@ XEN_HOTPLUG_SCRIPTS = xen-backend.agent
 UDEV_RULES_DIR = /etc/udev
 UDEV_RULES = xen-backend.rules
 
-DI = $(shell readlink -f $(DISTDIR))
-DE = $(shell readlink -f $(DESTDIR))
+DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
+DE = $(if $(DESTDIR),$(shell readlink -f $(DESTDIR)),)
 ifeq ($(findstring $(DI),$(DE)),$(DI))
 HOTPLUGS=install-hotplug install-udev
 else